package cn.itcast.crm.service.impl;


import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.itcast.crm.service.CustomerService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classpath:applicationContext.xml")
public class CustomerServiceImplTest {
	//注入service
	@Autowired
	private CustomerService customerService; 
	@Test
	public void testFindNoAssocationCustomer() {
		customerService.findNoAssocationCustomer();
	}

	@Test
	public void testFindHasAssocationFixedAreaCustomer() {
		customerService.findHasAssocationFixedAreaCustomer("111");
		System.out.println(customerService.findHasAssocationFixedAreaCustomer("111"));
	}

	@Test
	public void testAssocationCustomerToFixedArea() {
		customerService.assocationCustomerToFixedArea("3", "222");
	}

}
